package com.reason.order.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import javax.persistence.Id;
import java.io.Serializable;
import java.util.Date;

/**
 * @author 陈正果
 * @date 2020/06/30 11:13
 */

//@Data
@TableName("tb_order")
public class Order implements Serializable {

    /**
     * 订单id
     */
    @Id
    private String id;
    /**
     * 总金额
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)//防止丢失精度
    private long totalMoney;
    /**
     * 支付金额
     */
    @JsonFormat(shape = JsonFormat.Shape.STRING)//防止丢失精度
    private long payMoney;
    /**
     * 订单创建时间
     */
    private Date createTime;
    /**
     * 订单更新时间
     */
    private Date updateTime;
    /**
     * 订单完成时间
     */
    private Date endTime;
    /**
     * 订单关闭时间
     */
    private Date closeTime;
    /**
     * 用户名
     */
    private String username;
    /**
     * 用户id
     */
    private String userId;
    /**
     * 微信交易流水号
     */
    private String transactionId;
    /**
     * 订单状态
     */
    private String orderStatus;
    /**
     * 支付状态
     */
    private String payStatus;
    /**
     * 是否删除
     */
    private String isDelete;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public long getTotalMoney() {
        return totalMoney;
    }

    public void setTotalMoney(long totalMoney) {
        this.totalMoney = totalMoney;
    }

    public long getPayMoney() {
        return payMoney;
    }

    public void setPayMoney(long payMoney) {
        this.payMoney = payMoney;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public Date getEndTime() {
        return endTime;
    }

    public void setEndTime(Date endTime) {
        this.endTime = endTime;
    }

    public Date getCloseTime() {
        return closeTime;
    }

    public void setCloseTime(Date closeTime) {
        this.closeTime = closeTime;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getUserId() {
        return userId;
    }

    public void setUserId(String userId) {
        this.userId = userId;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getOrderStatus() {
        return orderStatus;
    }

    public void setOrderStatus(String orderStatus) {
        this.orderStatus = orderStatus;
    }

    public String getPayStatus() {
        return payStatus;
    }

    public void setPayStatus(String payStatus) {
        this.payStatus = payStatus;
    }

    public String getIsDelete() {
        return isDelete;
    }

    public void setIsDelete(String isDelete) {
        this.isDelete = isDelete;
    }

    @Override
    public String toString() {
        return "Order{" +
                "id='" + id + '\'' +
                ", totalMoney=" + totalMoney +
                ", payMoney=" + payMoney +
                ", createTime=" + createTime +
                ", updateTime=" + updateTime +
                ", endTime=" + endTime +
                ", closeTime=" + closeTime +
                ", username='" + username + '\'' +
                ", userId='" + userId + '\'' +
                ", transactionId='" + transactionId + '\'' +
                ", orderStatus='" + orderStatus + '\'' +
                ", payStatus='" + payStatus + '\'' +
                ", isDelete='" + isDelete + '\'' +
                '}';
    }
}
